<title>我的奖励</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<script type="text/javascript" src="#(path)/assets/js/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="#(path)/assets/js/jquery.tmpl.min.js"></script> 
#@checkToken()
<style> 
	body{font-family:"Microsoft YaHei",Arial,Helvetica,sans-serif,"宋体";}
	*{margin:0;padding:0;}
	li{list-style-type:none;}
	select,input{-webkit-appearance:none;border:0px;
		-webkit-tap-highlight-color: rgba(0, 0, 0, 0);   
	}
</style>
<body bgcolor="#fff" style="margin:0px;">
	<div align="center" style="width:100%;height:50px;border-bottom:1px solid #f0f0f0">
		<div align="center" style="background:#FFF;width:90%;height:50px;">
			<div align="center" style="width:90%;height:50px;background:#FFF;line-height:50px;">
				<div style="overflow:hidden;">
					<div onclick="window.location.href='/app/page/personal-nouse'" align="center" style="float:left;width:33%;border-bottom:2px solid #fa3048">
						<div><a style="font-size:16px;color:#fa3048">未使用</a></div>
					</div>
					<div  onclick="window.location.href='/app/page/personal-used'" align="center" style="float:left;width:33%">
						<div><a style="font-size:16px;">已使用</a></div>
					</div>
					<div  onclick="window.location.href='/app/page/personal-reward'" align="center" style="float:left;width:33%;">
						<div><a style="font-size:16px;">已失效</a></div>
					</div>
				</div>
			</div>
		</div>
	</div>
<div style="width:100%;height:10px;background:#f4f5f9"></div>

	<div id="alllist" align="center" style="padding-bottom:20px;"></div>
	<div id="showlists"></div>	
<script id="demo" type="text/x-jquery-tmpl">
	<div style="width:96%;height:70px;margin-top:10px;border:1px solid #b8b8b8;border-radius:10px">
		<div style="border-bottom:1px dashed #000;height:34px;">
			<div style="float:left;margin-left:10px;line-height:34px;font-size:14px;">${amount}元</div>
			<div style="float:left;font-size:12px;margin-left:10px;line-height:34px;">失效时间：${create_time}</div>
			<div style="float:right;margin-right:10px;"><img style="width:20px;" src="${url1}"></div>
		</div>
		<img style="width:40px;float:right;margin-top:-15px" src="#(assets)/images/mobile/reward_shixiao.png"> 
		<div>
			<div align="left" style="font-size:12px;margin-left:10px;line-height:17px;">${allow_bid}</div>
			<div align="left" style="font-size:12px;margin-left:10px;line-height:17px;">满${limit_amount}元可用</div>
		</div>
	</div>
</script>

<script type="text/javascript" src="/assets/dropload/dropload.min.js"></script>
<link rel="stylesheet" href="/assets/dropload/dropload.css">
<script>
var page = 0;
$('#alllist').dropload({
	scrollArea : window,
	loadDownFn : function(me){
		page++; 
		var url = "/couponLog/myList?token=#(session.token??)&size=10&status=normal&page="+page;
		console.log(page);
		$.getJSON(url, function(datalist) {
			console.log();
			$.each(datalist.data.page.list, function(i, item){ 
				console.log(item);
				if(item.type=="jxq"){
					var url1 = "#(assets)/images/mobile/reward_1.png";
				}else if(item.type=="tyj"){
					var url1 = "#(assets)/images/mobile/reward_3.png";
				}else if(item.type=="tzhb"){
					var url1 = "#(assets)/images/mobile/reward_2.png"; 
				}
				var invests = {url1:url1,amount:item.amount,create_time:item.create_time,allow_bid:item.allow_bid,limit_amount:item.limit_amount};
				$("#demo").tmpl(invests).appendTo('#alllist');
			});
			
			$(".dropload-down").css("height","0px"); 
			if(!datalist.data.page.lastPage){
				me.resetload();	
			}
		});
	}
});			
</script>



</body>